package org.to_zero.springboot.springbootquick.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.to_zero.springboot.hello.HelloService;
@Controller
@RequestMapping("hello")
public class HelloController {

    @Autowired
    private HelloService helloService;

    @GetMapping("fine")
    public String fine() {
        return "index";
    }


    @GetMapping("say")
    @ResponseBody
    public String sayHello(String[] args) {
        return helloService.hello(args);
    }

}
